package com.mttqq.family.service;

import com.mttqq.family.dao.UserDao;
import com.mttqq.family.pojo.User;

public class UserService {

	public static User login(String loginname, String loginpass) {

		User u = UserDao.getUserByLoginName(loginname);

		if (u != null) {
			if (u.getLoginpass().equals(loginpass)) {
				return u;
			}
		}

		return null;
	}

}
